﻿<?php
require $this->__RAD__ . 'component/global/head.php';
?>
<body>
<?php
require $this->__RAD__ . 'component/global/header.php';
?>
<div class="products content">
    <?php
    if ($this->aryAd) :
        ?>
        <div class="banner pc">
            <img src="<?= $this->__CDN__ ?>pics/l/<?= $this->aryAd[0]->ad_img ?>" alt="">
        </div>
        <?php
    endif;
    ?>
    <?php
    if ($this->aryAd) :
        ?>
        <div class="banner mb">
            <img src="<?= $this->__CDN__ ?>pics/l/<?= $this->aryAd[0]->ad_img ?>" alt="">
        </div>
        <?php
    endif;
    ?>
    <div class="home-product">
        <div class="product-swiper-box">
            <div class="swiper-container product-swiper w1200">
                <div class="swiper-wrapper">
                    <?php
                    if ($this->product) :
                    foreach ($this->product as $val) :
                    ?>
                    <div onclick="location.href='/products/index/<?= $val->category_id ?>'" class="swiper-slide <?= $this->categoryId == $val->category_id ? 'active' : '' ?>">
                        <div class="img-box">
                            <img src="<?= $this->__CDN__.'pics/l/'.$val->landscape ?>" alt="">
                        </div>
                        <p><?= $val->category_name ?></p>
                    </div>
                    <?php
                    endforeach;
                    endif;
                    ?>
                </div>
                <div class="swiper-button-prev"></div>
                <div class="swiper-button-next"></div>
            </div>
        </div>
        <!--产品列表-->
        <div class="w1200">
            <ul class="products-list2 clearboth">
                <?php
                if ($this->currentListRs) :
                foreach ($this->currentListRs as $val) :
                ?>
                <li>
                    <a href="/products/detail/<?= $val->archives_id ?>">
                        <div class="img-box">
                            <img src="<?= $this->__CDN__.'pics/l/'.$val->cover ?>" alt="<?= $val->title ?>">
                        </div>
                        <div class="text">
                            <p><?= $val->title ?></p>
                            <p><?= $val->synopsis ?> </p>
                        </div>
                    </a>
                </li>
                    <?php
                endforeach;
                endif;
                ?>
            </ul>
            <?php
            require $this->__RAD__ . 'component/global/getPages1.php';
            ?>
<!--            <div class="page ">-->
<!--                <a href="javascript:;" class="prev">上一页</a>-->
<!--                <a href="javascript:;">1</a>-->
<!--                <a href="javascript:;">2</a>-->
<!--                <a href="javascript:;">3</a>-->
<!--                <a href="javascript:;">4</a>-->
<!--                <a href="javascript:;">5</a>-->
<!--                <a href="javascript:;">...</a>-->
<!--                <a href="javascript:;" class="next">下一页</a>-->
<!--            </div>-->
        </div>
    </div>
</div>
<?php
require $this->__RAD__ . 'component/global/footer.php';
?>
<script>
    $(function(){
        products.index();
    })
</script>
</body>
</html>